/*
 * Sight.h
 *
 *  Created on: Feb 15, 2010
 *      Author: vuk
 */

#ifndef SIGHT_H_
#define SIGHT_H_

#include "NamedColorRangeHSV.h"

class Sight
{
	const int ESC;
	const int wide;
	NamedColorRangeHSV *color;
//	char taster;
	NamedColorRangeHSV b;
	NamedColorRangeHSV g;
	NamedColorRangeHSV y;
	NamedColorRangeHSV r;
	NamedColorRangeHSV w;
	NamedColorRangeHSV c;
	VideoCapture cap;
	Mat rawframe;
	Mat frame;
	Mat warp_matrix;
	Point2f frameQuad[4], positionQuad[4];
public:
	Sight();
	~Sight();


	void refresh();
	void showFrame();
	void showRawFrame();
	void showMiniRawFrame();
	void changeColors(const char &taster);
	void makeFilteredFrame();
	void roadObsticle(int &X, int &Y, int fspace, int erspace);
	void roadObstacle(int &X, int &Y, int fspace, int erspace);
	void findRed(int &X, int &Y, int fspace, int erspace);

	void prepere(char taster)
	{
	    refresh();
	    //showRawFrame();
	    showMiniRawFrame();
	    changeColors(taster);
	    makeFilteredFrame();
	    showFrame();
	}


};

#endif /* SIGHT_H_ */
